package com.hdu.point_offer;

import java.util.ArrayList;
import java.util.List;

public class lcr164 {
    class Solution {
        public String crackPassword(int[] password) {
            List<String> strList = new ArrayList<>();
            for (int p : password) {
                strList.add(String.valueOf(p));
            }
            strList.sort((a, b)-> (a + b).compareTo(b + a));
            StringBuilder ans = new StringBuilder();
            for (String s : strList) {
                ans.append(s);
            }
            return ans.toString();
        }
    }
}
